The present invention relates to sets of physical mass storage devices that collectively perform as one or more logical mass storage devices. In particular, the present invention relates to methods and apparatus for maintaining data integrity across such a set of physical mass storage devices in the event of a power failure.
Use of disk memory continues to be important in computers because it is nonvolatile and because memory size demands continue to outpace practical amounts of main memory. At this time, disks are slower than main memory so that system performance is often limited by disk access speed. Therefore, it is important for overall system performance to improve both memory size and data access speed of disk drive units. For a discussion of this, see Michelle Y. Kim, "Synchronized Disk Interleaving", IEEE Transactions On Computers, Vol. C-35, No. 11, November 1986.
Disk memory size can be increased by increasing the number of disks and/or increasing the diameters of the disks, but this does not increase data access speed. Memory size and data transfer rate can both be increased by increasing the density of data storage. However, technological constraints limit data density and high density disks are more prone to errors.
A variety of techniques have been utilized to improve data access speed. Disk cache memory capable of holding an entire track of data has been used to eliminate seek and rotation delays for successive accesses to data on a single track. Multiple read/write heads have been used to interleave blocks of data on a set of disks or on a set of tracks on a single disk. Common data block sizes are byte size, word size, and sector size. Disk interleaving is a known supercomputer technique for increasing performance, and is discussed, for example, in the above-noted article.
Data access performance can be measured by a number of parameters, depending on the relevant application. In transaction processing (such as in banking) data transfers are typically small and request rates are high and random. In supercomputer applications, on the other hand, transfers of large data blocks are common.
A recently developed disk memory structure with improved performance at relatively low cost is the Redundant Array of Inexpensive Disks (RAID) (see, for example, David A Patterson, et al., "A Case for Redundant Arrays of Inexpensive Disks (RAID)", Report No. UCB/CSD 87/39, December, 1987, Computer Science Division (EECS), University of California, Berkeley, Calif. 94720. As discussed in the Patterson et al. reference, the large personal computer market has supported the development of inexpensive disk drives having a better ratio of performance to cost than Single Large Expensive Disk (SLED) systems such as the IBM 3380. The number of I/Os per second per read/write head in an inexpensive disk is within a factor of two of the large disks. Therefore, the parallel transfer from several inexpensive disks in a RAID architecture, in which a set of inexpensive disks function as a single logical disk drive, produces greater performance than a SLED at a reduced price.
Unfortunately, when data is stored on more than one disk, the mean time to failure varies inversely with the number of disks in the array. To correct for this decreased mean time to failure of the system, error recognition and correction is built into the RAID systems. The Patterson et al. reference discusses 5 RAID embodiments each having a different means for error recognition and correction. These RAID embodiments are referred to as RAID levels 1-5.
RAID level 1 utilizes Complete duplication of data and so has a relatively small performance per disk ratio. RAID level 2 improves this performance as well as the capacity per disk ratio by utilizing error correction codes that enable a reduction of the number of extra disks needed to provide error correction and disk failure recovery. In RAID level 2, data is interleaved onto a group of G data disks and error codes are generated and stored onto an additional set of C disks referred to as "check disks" to detect and correct a single error. This error code detects and enables correction of random single bit errors in data and also enables recovery of data if one of the G data disks crashes. Since only G of the C+G disks carries user data, the performance per disk is proportional to G/(G+C). G/C is typically significantly greater than 1, so RAID level 2 exhibits an improvement in performance per disk over RAID level 1. One or more spare disks can be included in the system so that if one of the disk drives fails, the spare disk can be electronically switched into the RAID to replace the failed disk drive.
RAID level 3 is a variant of RAID level 2 in which the error detecting capabilities that are provided by most existing inexpensive disk drives are utilized to enable the number of check disks to be reduced to one, thereby increasing the relative performance per disk over that of RAID level 2.
The performance criteria for small data transfers, such as is common in transaction processing, is known to be poor for RAID levels 1-3 because data is interleaved among the disks in bit-sized blocks, such that even for a data access of less than one sector of data, all disks must be accessed. To improve this performance parameter, in RAID level 4, a variant of RAID level 3, data is interleaved onto the disks in sector interleave mode instead of in bit interleave mode as in levels 1-3. The benefit of this is that, for small data accesses (i.e., accesses smaller than G+C sectors of data), all disks need not be accessed. That is, for a data access size between k and k+1 sectors of data, only k+1 data disks need be accessed. This reduces the amount of competition among separate data access requests to access the same data disk at the same time.
Yet the performance of RAID level 4 remains limited because of access contention for the check disk during write operations. For all write operations, the check disk must be accessed in order to store updated parity data on the check disk for each stripe (i.e., row of sectors) of data into which data is written. Therefore, write operations interfere with each other, even for small data accesses. RAID level 5, a variant of RAID level 4, avoids this contention problem on write operations by distributing the parity check data and user data across all disks.
Power failures present unique problems to RAID architectures that conventional error recognition and correction techniques will not handle reliably. In a conventional SLED storage system, write requests translate into write operations on a single disk. If a power failure occurs during such a write request, it is more likely that the operation will complete before the disk loses power. However, in RAID architectures, write requests translate into write operations on multiple disks. For RAID write operations, if a power failure occurs during a write request, it may happen that only some of the disks involved in the write request will complete their write operations and that others will not have started their write operations. Although this results in only a partial completion of the write request, this failure to complete the write operation will not be detected if the disks that did not complete the write operation did not write any data at all. In addition, the data on the check disks across the data stripe that was being altered may be invalid (i.e., not equal to the correct check information for the data disks), thereby leading to the possibility that other sectors uninvolved in the write request will also not be able to be regenerated subsequently.
In view of the foregoing, it would be desirable to be able to provide a way to determine, on restoration of power to a multiple device mass storage system after a power loss, whether or not a write operation was interrupted when power was removed, and to reconstruct any data that may be inconsistent with other stored data because of the removal of power.